﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Encodings.Web;
using System.Threading.Tasks;

namespace MvcMovie.Controllers
{
    public class HelloWorldController : Controller
    {
        //GET:/HelloWorld
        public string Index()
        {
            return "默认行为";
        }
        //GET:/HelloWorld/Welcome
        //Requires using System.Text.Encodings.Web
        public string Welcome(string name,int ID = 1)
        {
            return HtmlEncoder.Default.Encode($"Hello{name},ID :{ID}");
        }
    }
}
